{% extends "base.html" %}

{% block script %}
<script type="text/javascript" src="/static/assets/bootstrap/jqBootstrapValidation.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $("input,select,textarea").not("[type=submit]").jqBootstrapValidation();
});
</script>
{% endblock %}

{% block body %}
<form class="form-horizontal" action="" method=post>
  <fieldset>
    <legend>{{ _("Login") }}</legend>
    {% with messages = get_flashed_messages() %}
        {% if messages %}
            <div class="alert alert-dismissable alert-danger">
                <button type="button" class="close" data-dismiss="alert">×</button>
                {% for message in messages %}
                    {{ message }}
                {% endfor %}
            </div>
        {% endif %}
    {% endwith %}
    <div class="form-group">
      <label for="inputEmail" class="col-sm-2 control-label">Email</label>
      <div class="col-sm-4">
        <input type="email" name="email" class="form-control" id="inputEmail" placeholder="Email"
               maxlength="30" autofocus required>
      </div>
    </div>
    <div class="form-group">
      <label for="inputPassword" class="col-sm-2 control-label">{{ _("Password") }}</label>
      <div class="col-sm-4">
        <input type="password" name="password" class="form-control"
               minlength="4" maxlength="30"
               id="inputPassword" placeholder="{{ _("Password") }}" required>

        <a id="forgot" href="javascript:;" class="hide">{{ _("Forgot Password?") }}</a>

      </div>
    </div>
    <div class="form-group">
        <div class="col-sm-2 col-lg-offset-2">
            <div class="checkbox">
              <label>
                <input type="checkbox" name="remember" checked> {{ _("Remember me") }}
              </label>
            </div>
        </div>
    </div>
    <div class="form-group">
      <div class="col-sm-2 col-lg-offset-2">
        <button type="submit" class="btn btn-primary btn-block">{{ _("Login") }}</button>
      </div>
    </div>
  </fieldset>
</form>
{% endblock %}
